<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware')
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    $router->resource('auth/permissions','PermissionController');
    $router->resource('auth/users','UserController');
    $router->resource('auth/roles','RoleController');

    // 客户列表
    $router->resource('member','MemberController');
    $router->get('member/{member}/{amount_type}','MemberController@editRujin')->name('member.edit-rujin');
    $router->put('member/{member}/update-rujin','MemberController@updateRujin')->name('member.update-rujin');

    // 审核用户资料
    $router->resource('userbank','UserBankController');

    // 审核 USDT 钱包地址
    $router->resource('userusdt','UserUsdtController');

    // 用户等级
    $router->resource('users-leader','UsersLeaderController');

    // 修改推荐人
    $router->resource('recommend','SaveRecommendController');


    // 团队管理
    $router->get('user_team', 'AdminUserController@userteam')->name('hdcrm.admin_user.userteam');// 团队管理
    $router->post('team_data', 'AdminUserController@team_data')->name('hdcrm.admin_user.team_data');// 团队管理 数据查询
    $router->post('my_money', 'AdminUserController@my_money')->name('hdcrm.admin_user.my_money');// 团队管理 数据查询个人



    $router->get('/withdrawal','WithdrawalController@index')->name('zbsht.withdrawal.index');// 投出页面
    $router->get('/withdrawal/benjingrid','WithdrawalController@index')->name('zbsht.withdrawal.index');// 投出页面
    $router->get('/withdrawal/{withdrawal}','WithdrawalController@show')->name('zbsht.withdrawal.show');// 投出页面
    $router->get('/withdrawal/{withdrawal}/edit','WithdrawalController@edit')->name('zbsht.withdrawal.edit');// 投出页面
    $router->put('/withdrawal/{withdrawal}','WithdrawalController@update')->name('zbsht.withdrawal.update');// 投出页面
    $router->delete('/withdrawal/{withdrawal}','WithdrawalController@destroy')->name('zbsht.withdrawal.destroy');// 投出页面
    $router->delete('/withdrawal/benjingrid/{withdrawal}','WithdrawalController@destroy')->name('zbsht.withdrawal.destroy');// 投出页面
    $router->get('/withdrawal/benjingrid/{withdrawal}','WithdrawalController@show')->name('zbsht.withdrawal.show');// 投出页面
    $router->get('/withdrawal/benjingrid/{withdrawal}/edit','WithdrawalController@edit')->name('zbsht.withdrawal.edit');// 核审投出 打开页面
    $router->put('/withdrawal/benjingrid/{withdrawal}','WithdrawalController@update')->name('zbsht.withdrawal.update');// 核审投出 提交页面

    $router->resource('weekcheckout','WeekCheckoutController');// 周结算
    $router->resource('deposite','DepositeController');// 周结算




});
